A组件
<template>
  <div class="divA">
    <div>这是A组件</div>
    <child :foo="foo" :coo="coo" @upRocket="reciveRocket"></child>
  </div>
</template>
<script>
  import Child from './Child.vue'
  export default {
    data() {
      return {
        foo: "A组件",
        coo: "Hello,A"
      }
    },
    components: {
      Child
    },
    methods: {
      reciveRocket() {
        console.log("A组件")
      }
    }
  }

</script>
<style scoped>
  .divA {
    width: 500px;
    height: 500px;
    padding: 10px;
    color: #f00;
    border: 1px solid #f00;
  }

</style>复制代码
